//
//  LZFooterCollectionReusableView.m
//  laziz_Consumer
//
//  Created by XMac on 16/10/27.
//  Copyright © 2016年 XBN. All rights reserved.
//

#import "LZSearchFooterCollectionReusableView.h"

@interface LZSearchFooterCollectionReusableView ()


@property (strong, nonatomic) IBOutlet UIButton *clearButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *clearButtonWitdhConstraint;

@end

@implementation LZSearchFooterCollectionReusableView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [_clearButton setTitle:LZLocalizedString(@"search_clear_history", nil) forState:UIControlStateNormal];
    _clearButton.layer.cornerRadius = 15;
    _clearButton.layer.masksToBounds = YES;
    _clearButton.layer.borderWidth = 0.5;
    _clearButton.layer.borderColor = UIColorFromRGB(0xff7a21, 1).CGColor;
    
    self.clearButtonWitdhConstraint.constant = self.clearButton.titleLabel.intrinsicContentSize.width + 28;
    
}


- (IBAction)clearButtonClick:(UIButton *)sender {
    if (_clearBlock) {
        _clearBlock();
    }
}


@end
